const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

const config = {
	entry: './src/main.js',
	output: {
		filename: 'js/[name].bundle.js',
		path: path.resolve(__dirname, './dist')
	},
	plugins: [
		new HtmlWebpackPlugin({
      		template: 'index.html'
		})
	],
	module: {
		rules: [
      {test: /\.css$/, loader: 'style-loader!css-loader'},
			{test: /\.js$/, use: 'babel-loader', exclude: '/node_modules/'},
			{test: /\.vue$/, use: 'vue-loader'}
		]
	},
	resolve: {
		alias: {'vue': 'vue/dist/vue.js'}
	}
}

module.exports = config ;